#include "widget.h"
#include "ui_widget.h"
#include<QString>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    connect(ui->pushButton,&QPushButton::clicked,this,&Widget::handclick);
}
Widget::~Widget()
{
    delete ui;
}
void Widget::handclick()
{
    if(ui->pushButton->text()==QString("点击我"))
    {
        ui->pushButton->setText("再点一下试试呢？");
    }else if(ui->pushButton->text()==QString("再点一下试试呢？")){
        ui->pushButton->setText("再点一下，我打死你");
    }else if(ui->pushButton->text()==QString("再点一下，我打死你")){
        ui->pushButton->setText("不是你还点？");
    }else if(ui->pushButton->text()==QString("不是你还点？")){
        ui->pushButton->setText("好吧,我投降了");
    }else{
        ui->pushButton->setText("结束了，再见");
    }
}
